﻿<%@ Page Language="C#" MasterPageFile="~/Templates/Admin.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Admin_Forum_Default"  %>

<%@ Register Assembly="Jalal.Library" Namespace="Jalal.Library.Web.Control" TagPrefix="ucc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MiddleArea" Runat="Server">
<table width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td style="height: 20px;">
                &nbsp;
            </td>
        </tr>
        <tr>
        <td align="left">
        <a href="add-post.aspx">Add Forum Post</a>
        <br />
        <a href="post-category-list.aspx">Forum Post Category </a>
        <br />
        <a href="add-postCategory.aspx"> Add Forum Post Category</a>
        <br />
        <a href="tag-list.aspx"> Tag List</a>
        </td>
        </tr>
        <tr>
        <td align="center" valign="top">
         <ucc:ResponseMessage ID="uccResponse" runat="server"></ucc:ResponseMessage>
        </td>
        </tr>
        <tr>
            <td align="center" valign="top">
                <asp:GridView ID="grvPost" runat="server" SkinID="GridView1" Width="100%">
                    <Columns>
                        <asp:BoundField DataField="PostID" HeaderText="ID#" />
                        <asp:BoundField DataField="UserID" HeaderText="UserID#" />
                       
                        <asp:BoundField DataField="PostTitle" HeaderText="Title" />
                        <asp:BoundField DataField="PostDate" HeaderText="Post Date" />
                        <asp:BoundField DataField="IsReply" HeaderText="IsReply" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <a href="<%= BCGC.BLL.Helper.CustomSiteMap.DetailsPost %>?id=<%#Eval("PostID") %>">
                                    View</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="lnbDelete" runat="server" CommandName="cmdDelete" CommandArgument='<%#Eval("PostID") %>'
                                    Text="Delete" OnClientClick="javascript:return confirm('are you sure, you want to delete?');"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Repeater ID="rptPager" runat="server">
                    <ItemTemplate>
                        <asp:LinkButton ID="lkbPageIndex" runat="server" CssClass="page-index" 
                            Text='<%# Container.DataItem.ToString() %>' CommandName="PagingCommand"
                            CommandArgument='<%# Container.DataItem %>'
                            OnCommand="Page_Change"></asp:LinkButton>
                    </ItemTemplate>
                </asp:Repeater>
            </td>
        </tr>
    </table>
</asp:Content>

